package cn.myspringboot.user.domain.vo;

import cn.myspringboot.user.domain.Employee;
import cn.myspringboot.user.domain.Role;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;
@Data
public class EmployeeVo {
    private Long       id;
    private String     username;
    private String     phone;
    private String     email;
    private Integer    age;
    private Integer    state;
    private List<Long> roles;
    public static Employee of(EmployeeVo employeeVo) {
        Employee employee = new Employee();
        BeanUtils.copyProperties(employeeVo, employee);
        return employee;
    }
}
